# -*- coding:utf-8 -*-
#主窗口

from PyQt4 import QtGui, QtCore
from ssc_widget import SSCWidget
from constants import *

class MainWindow(QtGui.QWidget):
    def __init__(self, parent = None):
        QtGui.QWidget.__init__(self, parent)
        self.setWindowTitle("dont do evil")

        self._init_child()

    def _init_child(self):
        self._grid = QtGui.QGridLayout()
        self._grid.setSpacing(5)
        self.setLayout(self._grid)

        self._tab_bar = QtGui.QTabWidget()
        self._grid.addWidget(self._tab_bar)

        self._tab_bar.setCurrentIndex(0)

        self._ssc_cq = SSCWidget(SSC_CQ)
        self._ssc_xj = SSCWidget(SSC_XJ)
        
        self._tab_bar.addTab(self._ssc_cq, "cq")
        self._tab_bar.addTab(self._ssc_xj, "xj")
